import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:yt_devops/resources/resources.dart';
import 'package:yt_devops/resources/str_res_keys.dart';

class TotastUtils {
  static success(BuildContext context,
      {String? title, void Function()? onDismiss}) {
    BrnToast.show(title ?? '${ResKey.submitSuccessTip.tr}! ', context,
        preIcon: Image.asset(
          ImageAssets.iconSuccess,
          width: 24,
          height: 24,
        ),
        duration: BrnDuration.short,
        onDismiss: onDismiss);
  }

  static tip(BuildContext context,
      {required String title, void Function()? onDismiss}) {
    BrnToast.show(title, context,
        duration: BrnDuration.short, onDismiss: onDismiss);
  }
}
